# /app/docker-compose.yml
version: '3.8'

services:
  fastapi:
    build:
      context: .
      dockerfile: dockerfile-fastapi
    image: rag_bot_image_fastapi
    container_name: RAG_BOT_FASTAPI
    ports:
      - "8000:8000"
    volumes:
      - .:/app

  gradio:
    build:
      context: .
      dockerfile: dockerfile-gradio
    image: rag_bot_gradio
    container_name: RAG_BOT_GRADIO
    ports:
      - "7860:7860"
    volumes:
      - ./src/ui/:/src/ui/

  qdrant:
    image: qdrant/qdrant
    container_name: RAG_BOT_QDRANT
    volumes:
      - qdrant_data:/qdrant/storage
    ports:
      - "6333:6333"
    environment:
      - QDRANT_WEB_SERVER_ADDRESS=0.0.0.0:6333

volumes:
  qdrant_data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: ./.data/qdrant/
